1. Field of the Invention
The present invention relates to a recording apparatus and a recording system having a disk-shaped recording medium or the like, and an error notification method used in the same, and particularly to a recording apparatus, a recording system and an error notification method that are preferably used in recording audio signals and moving pictures.
2. Description of the Related Art
A disk drive, which is one type of recording apparatus, receives input and output commands such as read command and write command through a disk interface, and records data in a specified recording area (sector) or reads data from a specified recording area (sector).
The disk drive incorporates a recording medium. The recording medium is divided into divisions called tracks having concentric or spiral configuration. The track is further divided into divisions of the same lengths called sectors. Data are recorded in the sectors. While the recording medium is rotating, a head disposed to oppose the surface of the recording medium is moved by an actuator in the radial direction of the recording medium thereby to position the head above a target location of the recording medium, where the data are read or written.
However, signal level recorded on the recording medium may deteriorate. Positioning of the head may also fail due to mechanical vibration or electrical noise generated when reading or writing the data. Thus one often encounters missing error where a part of the data could not be read and is not represented, or mutation error where read data or written data is misrepresented to have a value different from the true value.
In the prior art, as measures to solve the problem of missing error or mutation error, error control code (ECC) is written in the recording medium for detecting and correcting errors, in addition to the contents data.
In this case, when an error is found in the contents data with the error control code that has been read, correction is attempted by means of an error correction circuit. When the error cannot be corrected by this operation, an error detection signal is output.
In a case where the error correction circuit fails to correct the error, error processing means makes an attempt to read the data again, repeating the attempt till correctable data are successfully read. In a case where the error cannot be corrected after a certain number of retrials, the error correcting means determines that a data error has occurred.
A number of disk drives such as that described above have been used in computer systems dedicated to computation or database management. In such systems, requests to the disk drive for input or output of data and processing of the input or output data are all carried out by a general-purpose processor.
Due to the characteristics of the data to be input or output, there is not such a demanding limitation on the time taken in input and output of data as in the case of program and database data. However, in many cases, even a single error may render the rest of the data meaningless even when they are correctly read.
For these reasons, the disk drive of the prior art is designed to make retrials of reading data over a considerable length of time (several seconds to ten seconds per sector), in case an error cannot be corrected. In a case where the data cannot be read after retrials of reading, and the error processing means has determined that a data error occurred, output of the data is interrupted and an interrupt request is placed on the general-purpose processor, that has made the output request, thereby to notify the occurrence of error thereto.
In recent years, increase in the data storage capacity of the disk drive and the advancements in the compression technology for moving picture data have led to the development of many systems such as video servers that store audio and video data on disk drives.
The audio and video data have two features distinct from the data handled in the conventional computer systems. The first feature is that there is a limitation on the time that is allowed for the input/output from/to the disk (recording medium) when recording a broadcast program or reproducing the data on a TV monitor. That is, it is not allowed to make many attempts to read data. Another feature is that the presence of uncorrectable error does not make it meaningless to read the rest of the data, because disturbance due to the data error is restricted within the vicinity of the erroneous data.
Recently, from the point of view described above, such improvements of the disk drive have been studied as (a) to provide a function for specifying from the outside a maximum limit to the time taken for input/output including retrials of reading; (b) to eliminate the function that stops the input/output in the event of data error; and (c) to eliminate the function that omits output of data which include data error.
With the function mentioned in (b), when data that have been read include an error, the data including the error are not output to the outside of the disk drive. But even in this case, reading operation is not stopped and the subsequent data are read with only such data that do not include error being output.
The reason why the function mentioned in (c) is being studied is that a decoder for moving picture or audio data has a function to process data errors, and therefore reproduced data with less deterioration in quality may often be achieved by processing the entire data including errors, than omitting the data that include errors from the processing operation with the function mentioned in (b). In the case of the function mentioned in (c), however, it is difficult to precisely estimate the effect of an error inside of the disk drive, because the extent of the effect varies depending on which part of MPEG (Moving Picture Experts Group) data includes the error and on the length of the data including the error.
Improvements being studied for the storage of audio or moving picture data include, besides those described above, such a constitution as processing of the audio and moving picture data is assigned to a dedicated processor, because a large amount of audio or moving picture data must be processed without interrupt. In this case, a general-purpose processor is required to only make input and output requests to the disk drive. The output data are input to the dedicated processor without being processed in the general-purpose processor.
An example of processor dedicated for the processing of audio or moving picture data is the MPEG2 (Moving Picture Experts Group phase 2) decoder. The MPEG technology compresses video data by eliminating the redundancy in space domain and time domain. To eliminate the redundancy in time domain, in particular, moving picture data are divided into sets of still picture frames, each set consisting of a plurality of still picture frames of which one frame is compressed as a still picture while the other frames are compressed by extracting only the differential information among the frames. The MPEG decoder reproduces the original moving pictures from the MPEG data.
There are a filter and/or a dedicated communication processor installed between the disk drive and the MPEG decoder. As an example of such dedicated processor, a filter processor is disclosed in Japanese Patent Laid-Open Publication No. Hei 03-235589. The filter processor discriminates valid data packets which are necessary for reproduction and invalid data packets which are not necessary for reproduction, among the train of packets of moving picture or audio data that has been received through communication, and removes the invalid packets to reduce the amount of data, thereby increasing the equivalent length of time of the data that can be recorded on the disk.
The filter processor records the number of invalid packets, which have been removed, on the recording apparatus while being appended to the valid packets and, when retrieving the data from the recording apparatus, transmits the data while inserting the recorded number of empty packets between valid packets. This makes it possible to transmit the valid packets at the same time intervals as in receiving.
When the functions mentioned in (a) through (c) are provided, however, frequency of occurrence of data errors increases due to the function of (a), and therefore it is expected that data that include missing data or mutation error would be output as in the functions of (b) and (c) every time the data error occurs. Thus such a trouble is expected to occur even in the dedicated processor described above, that the input of such data leads to malfunction and results in the reproduction of moving picture or audio data being interrupted.
In the case of the filter processor described above, for example, when data which have been read from the disk drive include error and there is an error in the portion of the number of invalid data packets that has been counted when receiving, there is a possibility of such problems that a number of empty packets are sent or, conversely, a number of valid packets are sent simultaneously in a burst.
When such a trouble occurs, in a case where data are input to an apparatus provided with an MPEG decoder, picture or sound may be interrupted, such troubles may be caused as the received data cannot be decoded resulting in missing picture or sound during reproduction, or generation of noise.
Also in a case where an improved disk drive provided with the functions mentioned in (a) through (c) is used, an error occurring in a disk is notified only to the general-purpose processor and is, after being processed by a program on the general-purpose processor, notified to the dedicated processor.
Specifically, the notification is made in the following procedure.
First, when an error occurs in the disk drive, the disk drive having the function of (a) continues the reading of data and stops after completing the reading of all data to be read, in contrast to the disk drive of the prior art which would interrupts the reading of data.
Completion of the reading command is notified to the general-purpose processor using an interrupt signal line. The general-purpose processor carries out the ongoing program process up to a convenient point and, after storing the values of internal registers in memory, calls an interrupt processing program.
The interrupt processing program sends a status read command to the disk drive for the purpose of identifying the cause of interrupt, and receives status information. When it is determined from the status information that a data error has occurred during execution of the read command, the general-purpose processor notifies the dedicated processor that there is an error in the data.
Thus often it takes many steps for an error notification to be transmitted from the disk drive to the dedicated processor. In a case where the dedicated processor receives data including the error before receiving the error notification, the dedicated processor may malfunction as described above. To prevent the malfunction, it is necessary to delay the data transmission by adding a new or an additional FIFO (first-in, first-out) memory in a path between the disk drive and the dedicated processor where data are transferred.
The time taken to notify the existence of error by the program can be made shorter by using a realtime OS (Operating System), which is specialized in interrupt processing, as the basic software. However, a graphical user interface is indispensable for an apparatus that handles moving picture or audio data, while most of realtime operating systems do not provide satisfactory environment for developing graphical user interface.
On the other hand, basic software that is suitable for developing graphical user interface is slow in triggering interrupt processing at present, and the time taken to notify the occurrence of error may be very long.
An object of the present invention is to provide a recording apparatus, a recording system and an error notification method that are capable of transmitting data error to a dedicated processor without the aid of a general-purpose processor.
According to one aspect of the present invention, a recording apparatus comprises a recording medium, an error correction circuit and an error processing circuit. The error correction circuit corrects errors in read data which are read from the recording medium. The error processing circuit inserts a data pattern in data which are output from the error correction circuit in a case where a missing error or a mutation error remains in the data. The data pattern indicates that the missing error or the mutation error remains.
According to another aspect of the present invention, a recording system provided with the above-described recording apparatus comprises an error detection circuit and a processor. The error detection circuit notifies occurrence of the missing error or the mutation error when the data pattern is detected in output data which are output from the recording apparatus. A processor processes the output data in accordance with the missing error or the mutation error.
According to another aspect of the present invention, an error notification method for a recording apparatus provided with a recording medium and an error correction circuit which corrects errors in read data which are read from the recording medium comprises the step of inserting a data pattern in data which are output from the error correction circuit in a case where a missing error or a mutation remains in the data. The data pattern indicates the missing error or the mutation error remains.
According to the present invention, in case data that have been read from the recording medium include a missing error or a mutation error that cannot be corrected in the error correction circuit, the error processing circuit inserts the predetermined data pattern in the read data. As a result, the data pattern indicating the location of the error, for example, is detected by the error detection circuit and the output data from the recording apparatus is processes by the processor, so that the occurrence of the error is recognized in the recording system. Also in the event of error occurrence, disturbance may be minimized by performing a proper error processing operation in accordance with the location of error and/or the internal state of the processor.
The data pattern may be inserted, for example, at the head or the end of the portion that includes the error. Or, alternatively, information indicating the length of the portion that includes the error may be added at the head or the end of the portion that includes the error, or the data pattern may be inserted at equal intervals in the portion that includes the error.
Also it is made possible for the dedicated processor to select more appropriate process by inserting different data patterns depending on whether the error is a missing error or a mutation error.
Thus in a case where the output data from the error correction circuit includes a missing error or a mutation error remaining therein, the data error that occurred in the recording apparatus can be transmitted to a dedicated processor without the aid of a general-purpose processor, by inserting a predetermined data pattern that indicates the missing error or mutation error with the same size as that of the missing error or mutation error, for example, repetitively thereby providing the output thereof.
Further, the notification method described above for notifying data error to the processor may be switched in accordance with the read data. This makes it possible to store a plurality of kinds of data that would have been processed by processors of different types in the same recording apparatus.